package org.shoukaiseki.common.exception;

import org.shoukaiseki.common.utils.StringUtils;

/**
 *
 **/
public class VerificationException extends RuntimeException{

    private String message;

    public VerificationException(String message)  {
        super(message);
        this.message=super.getMessage();
    }

    public VerificationException(String message,Throwable t)  {
        super(message,t);
        this.message=super.getMessage();
    }

    public VerificationException format(Object... params){
        if (this.message==null) {
            return this;
        }
        //可变参数向下传递时加上 *
        this.message= StringUtils.format(this.message,params);
        return this;
    }
}
